﻿drop table Tests

create table Tests(
    Id int primary key,
    Name nvarchar(50) not null,
    Age int not null
)

insert into Tests values (1, N'段光伟', 20)
insert into Tests values (2, N'段光宇', 21)
insert into Tests values (3, N'段战军', 22)
insert into Tests values (4, N'段战亭', 23)

select
    Name,
    case
        when Age > 20 then N'有点老'
        else N'年轻'
    end as 年代
from Tests